<template>
	<view>
		<view class="" >
				<view class="content">
					<view class="" v-if="list.length==0" style="position: absolute;margin: auto;top:300rpx;left: 0;right: 0;width: 300rpx;text-align: center;">
						<image  src="../../static/image/nodata1.png" mode="" style="width: 300rpx;height: 200rpx;"></image>
						暂无数据
					</view>
					
					<view class="card" @tap="$util.toUrl('./yaoqingorderInfo?id='+item.id+'&shenheId='+item.shenheId+'&isBohui=true')" v-for="(item,index) in list" :key="item.id">
						<view class="oneTui uni-flex">
							<view class="" style="position: relative;margin-right: 16rpx;">
								<view class="touxiang">
									<image :src="$jiekou.uploadBaseUrl+item.head" mode="" class=""></image>
								</view>
								<!-- <view class=" yuandian "></view> -->
							</view>
							
							<view class="neirong" style="width: 100%;">
								<view class="uni-flex">
									<view class="" style="flex:1;justify-content: space-between;">
										<text class="user-name">{{item.username}}</text>
										<image src="../../static/image/yirenzheng.png" v-if="item.attestation==2" mode="" class="renzhengtu"></image>
									</view>
									<view v-if="item.pingfenStr!='' && item.pingfenStr!=undefined " class="pingding">综合评定:{{item.pingfenStr}}</view>
									<view v-else class="pingding">综合评定:未评分</view>
								</view>
								<view class="biaoqians uni-flex">
									<view class="biaoqian">商家ID：{{item.uid}}</view>
									<view class="biaoqian" v-if="item.tuanduiid != undefined && item.tuanduiid != ''">团队ID：{{item.tuanduiid}}</view>
								</view>
							</view>
						</view>
						<view class="user-info">
							<view class="xinxishuoming">
								<view class="pingtai">购物平台</view>
								<view class="jingdong">{{item.pingtaiStr}}</view>
							</view>
							<view class="xinxishuoming">
								<view class="pingtai">商品价格</view>
								<view class="jingdong">¥{{item.pirce}}</view>
							</view>
							<view class="xinxishuoming">
								<view class="pingtai">佣金</view>
								<view class="jingdong">¥{{item.yongjin}}</view>
							</view>
							<view class="xinxishuoming">
								<view class="pingtai">截止日期</view>
								<view class="jingdong">{{item.jiezhi_time | dateFormat('YYYY年mm月dd日')}}</view>
							</view>
						</view>
						<!-- <view class="status-css">进行中</view> -->
					</view>
				</view>
			</view>
	</view>
</template>

<script>
	import util from '@/common/util.js';
	export default {
		data() {
			return {
				list:[],
				uid:uni.getStorageSync("token")
			}
		},
		onLoad() {
			var that =this;
			that.$util.nuiAjax(that.$jiekou.yaoqingwodeOrder,{maijiaId:that.uid,taskStatus:14},function(res){
				console.log(JSON.stringify(res));
				that.list = res.data;
			});
			
			uni.$on("tonguoYaoqing",function(){
				that.$util.nuiAjax(that.$jiekou.yaoqingwodeOrder,{maijiaId:that.uid,taskStatus:14},function(res){
					console.log(JSON.stringify(res));
					that.list = res.data;
				});
			})
		},
		onPullDownRefresh() {
			var that =this;
			that.$util.nuiAjax(that.$jiekou.yaoqingwodeOrder,{maijiaId:that.uid,taskStatus:14},function(res){
				that.list = res.data;
				uni.stopPullDownRefresh();
			});
			
		},
		methods: {
			
		},
		filters:{
			dateFormat:(date,str)=>{
				if(date!=undefined){
					return util.dateUtils.dateFormat('YYYY年mm月dd日',new Date(date));
				}else{
					return util.dateUtils.dateFormat('YYYY年mm月dd日',date);
				}
			}
		}
	}
</script>

<style lang="scss">
	// .pingding{
	// 	height:40rpx;
	// 	font-size:28rpx;
	// 	font-weight:400;
	// 	color:rgba(51,51,51,1);
	// 	line-height:40rpx;
	// 	padding-right: 30rpx;
	// }
	.status-css{
		// height:40rpx;
		font-size:28rpx;
		font-weight:500;
		color:rgba(255,77,77,1);
		line-height:40rpx;
		padding-top: 30rpx;
		text-align: right;
	}
	.oneTui .zaixian{
		background-color: #10C82E;
	}
	.yuandian{
		position: absolute;
		width: 24rpx;
		height: 24rpx;
		border-radius:24rpx;
		background-color: #818181;
		right: 0;
		bottom: 4rpx;
		
	}
	.xinxishuoming{
		padding-top: 24rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}
	.pingtai{
		height:40rpx;
		font-size:28rpx;
		font-weight:400;
		color:rgba(153,153,153,1);
		line-height:40rpx;
	}
	.jingdong{
		height:40rpx;
		font-size:28rpx;
		font-weight:400;
		color:rgba(51,51,51,1);
		line-height:40rpx;
	}
	.touxiang{
		width: 92rpx;
		height: 92rpx;
		border-radius:50rpx;overflow: hidden;
		
	}
	.touxiang image{
		width: 100%;
		height: 100%;
	}
	.user-name{
		height:44rpx;
		font-size:32rpx;
		font-weight:500;
		color:rgba(25,25,25,1);
		line-height:44rpx;
		padding-right: 8rpx;
	}
	.renzhengtu{
		width: 26rpx;
		height: 32rpx;
		margin-top: 6rpx;
	}
	.biaoqian{
		height:34rpx;
		font-size:24rpx;
		font-weight:400;
		color:$uni-color-primary;
		line-height:34rpx;
		border: 1rpx solid $uni-color-primary;
		border-radius: 4rpx;
		padding: 2rpx 8rpx 0 8rpx;
		margin-right: 8rpx;
	}
	.neirong{
		margin-bottom: 10rpx;
	}
	.oneTui{
		background-color: #FFFFFF;
		padding-bottom: 36rpx;
		border-bottom: 1rpx solid #EEEEEE;
	}
	.content{
		// flex: 1;
		// padding-top: 24rpx;
		padding-left: 30rpx;
		padding-right: 30rpx;
		// overflow: auto;
		// overflow-y: scroll;
		// height: 100%;
		/*解决ios上滑动不流畅*/
		// -webkit-overflow-scrolling: touch;
	}
	.card{
		background-color: #FFFFFF;
		box-shadow:0px 0px 12rpx 0px rgba(240,240,240,0.5);
		border-radius:8rpx;
		padding: 24rpx;
		padding-bottom: 32rpx;
		margin-bottom: 20rpx;
	}
	page{
		background-color: $page-bg-color;
		height: 100%;
	}
	.hide{
		display: none;
	}
	.daohanglan{
		padding:24rpx 0 0 0;
		justify-content: space-around;
		background-color: $uni-text-color-inverse;
		// margin-top: 4rpx;
		margin-bottom: 18rpx;
		box-shadow:0px 8rpx 16rpx 0px rgba(246,247,248,1);
	}
	.selected{
		height:6rpx;
		background:$uni-color-primary;
		width: 100%;
		margin-top: 18rpx;
	}
	.text-selected{
		color:$uni-color-primary;
	}
	.text-no-selected{
		color:#191919;
	}
	.title-text{
		height:40rpx;
		font-size:28rpx;
		font-weight:500;
		line-height:40rpx;
	}
</style>

